<!DOCTYPE html>
<html lang="en">

	<include file="Public:header" />
	<include file="Public:page_css" />
	<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
		<include file="Public:nav" />
		<div class="row wrapper border-bottom white-bg page-heading">
            <div class="col-lg-12">
                <h2>编辑分类</h2>
                <ol class="breadcrumb">
                    <li>
                        <a href="index.html"><i class="fa fa-home"></i> 主页</a>
                    </li>
                    <li>
                        <a>文章管理</a>
                    </li>
                    <li>
                        <a>文章分类</a>
                    </li>
                    <li>
                        <strong>编辑分类</strong>
                    </li>
                </ol>
            </div>              
        </div>
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<div class="ibox-tools">
							<a class="collapse-link">
								<i class="fa fa-chevron-up"></i>
							</a>
						</div>
					</div>
					<div class="ibox-content">
						<form action="{:U('runedittype')}" method="post" class="form-horizontal" id="signupForm">
						<input type="hidden" name="cate_id" value="{$detail.cate_id}" />
							<div class="form-group">
								<label class="col-sm-2 control-label">分类名称</label>
								<div class="col-sm-6">
									<input type="text" name="cate_name" value="{$detail.cate_name}" placeholder="输入分类名称" class="form-control">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 control-label">排序</label>
								<div class="col-sm-6">
									<input type="text" name="orderby" value="{$detail.orderby}" placeholder="输入排序"  class="form-control">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<div class="col-sm-4 col-sm-offset-2">
									<button class="btn btn-primary" type="submit">保存信息</button>&nbsp;&nbsp;&nbsp;
									<a class="btn btn-danger" href="{:U('Article/indextype')}">取消</a>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		<script type="text/javascript">
			$(function(){		
				$('#signupForm').ajaxForm({		
					success: complete, 
					dataType: 'json'
				});
				
				function complete(data){		
					if(data.status==1){
						
						layer.alert(data.info, {icon: 6}, function(index){
			 			layer.close(index);
						window.location.href=data.url;
						});
					}else{
						layer.alert(data.info, {icon: 5});
						return false;	
					}
				}	 
			});
		</script>
		<include file="Public:footer" />
	</body>
</html>